<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    
    <title>主界面</title>
    
	

  </head>
  <style>
  	.ten{
  		padding-top:15px;
  }
  #six{
  		padding-top:50px;
  }
  #four{
  		margin-top:-110px;
  }
  </style>
  
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">UML_Struct2项目</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#">${userName}欢迎使用个人信息管理平台</a></li>
            <li><a href="#">Settings</a></li>
            <li><a href="#">Profile</a></li>
            <li><a href="#">Help</a></li>
          </ul>
          <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="Search...">
          </form>
        </div>
      </div>
    </nav>
    
    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar" id="six">
          <ul class="nav nav-sidebar">
            <li class="active"><a href="findAllPersonMessageServlet?userName=${userName}">个人信息管理 <span class="sr-only">(current)</span></a></li>
            <li><a href="findAllFriendsServlet?userName=${userName}">通讯录管理</a></li>
            <li><a href="findAllDateTimeServlet?userName=${userName}">日程安排管理</a></li>
            <li><a href="findAllFileServlet?userName=${userName}">个人文件管理</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="login/index.jsp">推出主界面</a></li>
            <li><a href="">欢迎${userName}使用本系统！</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href=""></a></li>
            <li><a href=""></a></li>
            <li><a href=""></a></li>
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-8 col-md-offset-2 main">
        	<div class="ten">
          		<h1 class="page-header">个人文件管理</h1>
          	</div>
          	<div class="row placeholders">
            <div class="col-xs-6 col-sm-3 placeholder">
              <a href="fileManager/FileUpload.jsp" class="one">上传文件</a>
            </div>
            <div class="col-xs-6 col-sm-3 placeholder">
              <a class="two">文件列表</a>
            </div>
            <div class="col-xs-6 col-sm-4 placeholder">
            	<form action="DownloadFileServlet?filename=${name}" method="post">
            		<input type="text" value="${name}">
            		<input type="submit" value="下载文件">
            	</form>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div align="center" id="four">
    <!-- <div id="six" align="center"> 你还没有上传文件！</div> -->
    	<table border="3">
    		<tr>
    			<td>文件标题</td>
    			<td>文件名字</td>
    			<td>文件类型</td>
    			<td>文件大小</td>
    		</tr>
    		<c:forEach items="${listfile}" var="file">
    		 <tr>
    			<td>${file.title}</td>
    			<td>${file.name}</td>
    			<td>${file.contentType}</td>
    			<td>${file.size}</td>
    		</tr>
    		</c:forEach>
    	</table>
    </div>
  </body>
</html>
